{% extends "base.html" %}

{% block content %}
<div id="admintable">
<table>
    <tr class="table_header"><td >Joined Date</td><td>Nickname</td><td>Last Post</td><td># Posts</td><td>Google User</td><td>Subscriber?</td><td>Enabled?</td><td>Action</td></tr>
{% for profile in profiles %}
<tr class="table_row"><td>{{ profile.datejoined|date:"D, M d Y" }}</td><td>{{ profile.nickname }}</td><td>{{ profile.lastpost|date:"D, M d Y" }}</td><td>{{ profile.commentcounter }}</td><td>{{ profile.googleuser }}</td>
<td>{% if profile.subscriber %}Yes{% else %}No{% endif %}</td>
<td>{% if profile.enabled %}Yes{% else %}No{% endif %}</td>
<td><form method="post" action="/adminprofile"><input type="hidden" name="profilekey" value="{{ profile.key }}">{% if profile.enabled %}<input type="submit" name="action" value="Disable Profile">{% else %}<input type="submit" name="action" value="Enable Profile">{% endif %}</form></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}